home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 July / Chip_2004-07_cd1.bin / oddech / pipe / PipeDownDemo.exe / 2057 / SHOCKWAVE / 132 / 00007_first load.ls < prev    next >
Encoding:
Text File  |  2004-05-25  |  603 b   |  25 lines

  1. global gLoaded
  2.  
  3. on exitFrame
  4.   loadcount = 0
  5.   membersNeeded = 0
  6.   repeat with i = 1 to 40
  7.     if string(member(i).type) <> "empty" then
  8.       membersNeeded = membersNeeded + 1
  9.       if member(i).mediaReady then
  10.         loadcount = loadcount + 1
  11.       end if
  12.     end if
  13.   end repeat
  14.   loadPercent = integer(loadcount / float(membersNeeded) * 100.0)
  15.   if loadPercent >= 100 then
  16.     setVariable(sprite(1), "loaded", "1")
  17.     gLoaded = 1
  18.     info = "LOADED...CLICK TO PLAY"
  19.   else
  20.     info = "LOADING..." & string(loadPercent) & "%"
  21.   end if
  22.   setVariable(sprite(1), "loadInfo", info)
  23.   go(the frame)
  24. end
  25.